package top.onedream.buildsmallsoftware.repo

import org.springframework.data.repository.CrudRepository
import org.springframework.stereotype.Repository
import top.onedream.buildsmallsoftware.model.user.Role

/**
 * 角色库
 * @author zhangkein
 * @date 2023/05/16
 * @constructor 创建[RoleRepository]
 */
@Repository
interface RoleRepository : CrudRepository<Role, Long> {

    /**
     * 找到角色根据角色名称
     * @param [roleName] 角色名
     * @return [Role?]
     */
    fun findRoleByRoleName(roleName: String?): Role?
}